<template>
	<view class="contents">
		<view class="input_mxx">
			<input type="number" placeholder="请输入手机号码" v-model="modile">
		</view>
		<view class="chaklan dis_f aic juc" @click="chakna">
			立即查看
		</view>
		<view class="dis_f aic juc  mt20">
			<view class="dis_f aic" @click="quehu">
				<image src="../../static/images/buqu.png" mode="aspectFill" class="qud" v-if="!checkbox"></image>
				<image src="../../static/images/qud.png" mode="aspectFill" class="qud" v-if="checkbox"></image>
				<text class="fs26 ml10">我已阅读并同意</text>
			</view>
			<text class="fs26 ml10 cred" @click="jump('/pages/text/text?type='+3)">《用户服务协议》</text>
			<text class="fs26 ">及</text>
			<text class="fs26  cred" @click="jump('/pages/text/text?type='+4)">《隐私政策》</text>
		</view>
		<view class="buttom_mxx">
			<view class="">
				{{shuomtext.beianmsg}}
			</view>
			<view class="dis_f aic juc mt10">
				<image src="../../static/images/beian.png" mode="" class="gongan"></image>
				<text>{{shuomtext.beian_sn}}</text>
			</view>
			<view class="mt10">
				{{shuomtext.banquan_msg}}
			</view>
			<view class="">
				版权所有
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				checkbox: true,
				modile: "",
				shuomtext: "",
			}
		},
		onLoad(option) {
			console.log(location.href)
			var ceshi  =location.href.substring(location.href.indexOf("5/") + 2 , location.href.lastIndexOf("#"));
			console.log(ceshi,12)
			if (ceshi != '') {
				var result = location.href.substring(location.href.indexOf("d=") + 2, location.href.lastIndexOf("#"));
				console.log(result);
				uni.setStorageSync('bd_vid', result)
			}

			this.modile = uni.getStorageSync('modile')
			this.shuomlist()
		},
		methods: {
			shuomlist() {
				this.api.post('login/getConfig', {
					type: 1,
				}).then(res => {
					console.log(res);
					if (res.code == 200) {
						this.shuomtext = res.data
						uni.setStorageSync('kf_tel', res.data.kf_tel)
						uni.setStorageSync('days', res.data.days)
					}
				})
			},
			jump(url) {
				uni.navigateTo({
					url: url
				})
			},
			quehu() {
				this.checkbox = !this.checkbox
			},
			chakna() {
				if (this.modile == '') {
					uni.showToast({
						title: '请输入手机号码',
						icon: "none"
					})
				} else {
					if (this.checkbox) {
						uni.setStorageSync('phone', this.modile)
						uni.navigateTo({
							url: '/pages/detection/detection'
						})
						// uni.navigateTo({
						// 	url:'/pages/payment/payment'
						// })
					} else {
						uni.showToast({
							title: '请同意并阅读《用户服务协议》及《隐私政策》',
							icon: "none"
						})
					}


				}

			}
		}
	}
</script>

<style>
	.gongan {
		width: 35rpx;
		height: 35rpx;
	}

	.buttom_mxx {
		position: relative;
		left: 0;
		text-align: center;
		width: 100%;
		color: #333;
		top: 20vh;
		font-size: 22rpx;
	}

	.qud {
		width: 30rpx;
		height: 30rpx;
	}

	.chaklan {
		position: relative;
		margin: 10rpx auto 44rpx;
		line-height: 88rpx;
		width: 658rpx;
		height: 88rpx;
		background: #cf2500;
		color: #fff;
		border-radius: 6rpx;
		margin-top: 30rpx;
		font-size: 32rpx;
	}

	input {
		display: inline-block;
		height: 44rpx;
		line-height: 44rpx;
		font-size: 30rpx;
		color: #333;
		flex: 1;
	}

	.input_mxx {
		position: relative;
		margin: 10rpx auto 44rpx;
		line-height: 88rpx;
		display: flex;
		align-items: center;
		padding-left: 48rpx;
		width: 600rpx;
		height: 88rpx;
		background: #fff;
		border: 2px solid #cf2500;
		border-radius: 6rpx;
		margin-top: 150rpx;
	}

	.contents {
		height: 100vh;
		width: 750rpx;
		background: #f6efeb url('../../static/images/home-bg.png') top no-repeat;
		background-size: 100%;
		padding-top: 400rpx;
		overflow: hidden;
		position: relative;
		box-sizing: border-box;
	}
</style>